var route = [
    {
        path: '/page',
        componentUrl: './pages/page.html',
        // keepAlive:true,
        
    },
    {
        path: '/route',
        componentUrl: './pages/route.html',
        routes: [{//content
            path: 'content',
            content: `
        <div class="page">
            <div class="navbar">
                <div class="navbar-inner sliding">
                    <div class="left">
                    <a href="#" class="link back">
                        <i class="icon icon-back"></i>
                        <span class="if-not-md">Back</span>
                    </a>
                    </div>
                    <div class="title">content</div>
                </div>
            </div>
            <div class="page-content">
            <div class="block">
                <p>This page created dynamically</p>
            </div>
            </div>
        </div>`,
        }, {//url
            path: 'url',
            url: './pages/route-url.html'
        }, {//template
            template: `
                <div class="page">
                <div class="navbar">
                    <div class="navbar-inner sliding">
                        <div class="left">
                        <a href="#" class="link back">
                            <i class="icon icon-back"></i>
                            <span class="if-not-md">Back</span>
                        </a>
                        </div>
                        <div class="title">template</div>
                    </div>
                </div>
                <div class="page-content">
                    <div class="block">
                    <p>Hello {{$route.params.name}}</p>
                    </div>
                </div>
                </div>
            `,
            path: 'template/:name/',
        }, {//template url
            templateUrl: './pages/template-url.html',
            path: 'templateUrl/:name/',
        }, 
        // {//pageName
        //     pageName: 'pageName',
        //     path: 'pageName',
        // }, {//el - page HTMLElement
        //     el: document.querySelector('.page[data-name="el"]'),
        //     path: 'el',
        // }, 
        {//Async
            async(routeTo, routeFrom, resolve, reject) {
                if (window.useAsync) {
                    resolve({ url: './pages/route-url.html' })
                } else {
                    resolve({ templateUrl: './pages/template-url.html' })
                }
            },
            path: "async"
        }]
    },
    {
        path: '/component/:param1',
        componentUrl: './pages/page-loader-component.html',
        // additional context
        options: {
            context: {
            foo: 'bar',
            },
        },
    },
    {
        path: '/template7',
        componentUrl: './pages/template7.html',
    },
    {
        path: '/popup',
        componentUrl: './pages/popup.html',
    },
    {
        path: '/swipeout',
        componentUrl: './pages/swipeout.html',
    },
    {
        path: '/calendar',
        componentUrl: './pages/calendar.html',
    },
    {
        path: '/calendar-page',
        componentUrl: './pages/calendar-page.html',
    },
    {
        path: '/dialog',
        componentUrl: './pages/dialog.html',
    },
    {
        path: '/infinite-scroll',
        componentUrl: './pages/infinite-scroll.html',
    },
    {
        path: '/lazy-load',
        componentUrl: './pages/lazy-load.html',
    },
    {
        path: '/picker',
        componentUrl: './pages/picker.html',
    },
    {
        path: '/pull-to-refresh',
        componentUrl: './pages/pull-to-refresh.html',
    },
    {
        path: '/swiper',
        templateUrl: './pages/swiper.html',
        routes:[
            {
                path: 'swiper-zoom',
                templateUrl: './pages/swiper-zoom.html',
            },
            {
                path: 'swiper-vertical',
                templateUrl: './pages/swiper-vertical.html',
            },
            {
                path: 'swiper-space-between',
                templateUrl: './pages/swiper-space-between.html',
            },
            {
                path: 'swiper-scrollbar',
                templateUrl: './pages/swiper-scrollbar.html',
            },
            {
                path: 'swiper-parallax',
                templateUrl: './pages/swiper-parallax.html',
            },
            {
                path: 'swiper-pagination-progress',
                templateUrl: './pages/swiper-pagination-progress.html',
            },
            {
                path: 'swiper-pagination-fraction',
                templateUrl: './pages/swiper-pagination-fraction.html',
            },
            {
                path: 'swiper-nested',
                templateUrl: './pages/swiper-nested.html',
            },
            {
                path: 'swiper-multiple',
                templateUrl: './pages/swiper-multiple.html',
            },
            {
                path: 'swiper-loop',
                templateUrl: './pages/swiper-loop.html',
            },
            {
                path: 'swiper-lazy',
                templateUrl: './pages/swiper-lazy.html',
            },
            {
                path: 'swiper-horizontal',
                templateUrl: './pages/swiper-horizontal.html',
            },
            {
                path: 'swiper-gallery',
                componentUrl: './pages/swiper-gallery.html',
            },
            {
                path: 'swiper-fade',
                templateUrl: './pages/swiper-fade.html',
            },
            {
                path: 'swiper-custom-controls',
                templateUrl: './pages/swiper-custom-controls.html',
            },
            {
                path: 'swiper-3d-coverflow',
                templateUrl: './pages/swiper-3d-coverflow.html',
            },
            {
                path: 'swiper-3d-cube',
                templateUrl: './pages/swiper-3d-cube.html',
            },
            {
                path: 'swiper-3d-flip',
                templateUrl: './pages/swiper-3d-flip.html',
            },
            
        ]
    },
    
]